
//
// Enum: Comparison
// Copyright 2006 by Ewout Stortenbeker
// Email: 4ewout@gmail.com
//
// This enum is part of the CodeEngine Framework.
// You can download the framework DLL at http://www.code-engine.com/
//
 
    /// <summary>
    /// Represents comparison operators for WHERE, HAVING and JOIN clauses
    /// </summary>
    public enum eQComparison
    {
        Eq,
        NotEq,
        Like,
        NotLike,
        Gt,
        Ge,
        Lt,
        Le,
        In
    }

    public class Comparision
    {
        public static string ToString(eQComparison comparisonOperator)
        {
            string output = "";
            switch (comparisonOperator)
            {
                case eQComparison.Eq:
                    output =  " = " ; break;
                case eQComparison.NotEq:
                    output =  " <> " ; break;
                case eQComparison.Gt:
                    output =  " > " ; break;
                case eQComparison.Ge:
                    output =  " >= " ; break;
                case eQComparison.Lt:
                    output =  " < " ; break;
                case eQComparison.Le:
                    output =  " <= " ; break;
                case eQComparison.Like:
                    output =  " LIKE " ; break;
                case eQComparison.NotLike:
                    output = "NOT " +  " LIKE " ; break;
                case eQComparison.In:
                    output =  " IN " ; break;
            }
            return output;
        }
    }
 
